package com.zj.ssm.controller;

import com.zj.ssm.pojo.domain.vo.PatientVo;
import com.zj.ssm.pojo.domain.vo.SubscribeVo;
import com.zj.ssm.pojo.domain.vo.UdoctorVo;
import com.zj.ssm.result.AjaxResult;
import com.zj.ssm.service.UdepartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lilinhui
 * @author diao 2022/2/20 星期日 13:44
 */
@RestController
@RequestMapping("Udepart")
public class RegisterController {

    @Autowired
    UdepartService udepartService;

    @RequestMapping("list")
    public AjaxResult list(){
        return udepartService.list();
    }

    @RequestMapping("departId/{id}")
    public AjaxResult departId(@PathVariable("id") Integer id){
        return udepartService.departId(id);
    }

    @RequestMapping("subscribe")
    public AjaxResult subscribe(SubscribeVo subscribeVo){
        return udepartService.subscribe(subscribeVo);
    }

    @RequestMapping("doctor/{yid}")
    public AjaxResult doctor(@PathVariable("yid") Integer yid){
        return udepartService.doctor(yid);
    }

    @RequestMapping("lost")
    public AjaxResult doctor(UdoctorVo udoctorVo){
        return udepartService.lost(udoctorVo);
    }

    @RequestMapping("information")
    public AjaxResult information(String name,String identity){
        return udepartService.information(name,identity);
    }

    @RequestMapping("Result/{id}")
    public AjaxResult patResult( @PathVariable("id")Integer id){
        return udepartService.patResult(id);
    }

    @RequestMapping("abolish")
    public AjaxResult abolish(String name,String identity){
        return udepartService.abolish(name,identity);
    }

}
